package com.simple.quotes.core;

import java.util.Calendar;
/**
 * Сущность-котировка
 * @author Petro
 */
public class Quote {
    private static String ticker;
    private static String period;
    private Calendar dateTime;
    private Double open;
    private Double high;
    private Double low;
    private Double close;
    private Double volatility;

    public Quote() {
    }

    public String toString() {
        return String.format("%1$s, %2$s, %3$tY.%3$tm.%3$td %3$tH:%3$tM:%3$tS, %4$4.4f, %5$4.4f, %6$4.4f, %7$4.4f %n", ticker, period, dateTime, open, high, low, close);
    }

    public static String getTicker() {
        return ticker;
    }

    public static void setTicker(String ticker) {
        Quote.ticker = ticker;
    }

    public static String getPeriod() {
        return period;
    }

    public static void setPeriod(String period) {
        Quote.period = period;
    }

    public Calendar getDateTime() {
        return dateTime;
    }

    public void setDateTime(Calendar dateTime) {
        this.dateTime = dateTime;
    }

    public Double getOpen() {
        return open;
    }

    public void setOpen(Double open) {
        this.open = open;
    }

    public Double getHigh() {
        return high;
    }

    public void setHigh(Double high) {
        this.high = high;
    }

    public Double getLow() {
        return low;
    }

    public void setLow(Double low) {
        this.low = low;
    }

    public Double getClose() {
        return close;
    }

    public void setClose(Double close) {
        this.close = close;
    }

    public Double getVolatility() {
        return volatility;
    }

    public void setVolatility(Double volatility) {
        this.volatility = volatility;
    }
}
